package com.hsgene.pay.exception;

import com.hsgene.common.util.exception.ErrorCode;

/**
 * 支付相关错误码
 *
 * @author wangbing
 * @version 1.0, 2018/10/9
 */
public enum PayErrorCode implements ErrorCode {

    /**
     * 支付相关错误码枚举
     */
    GENETIC_TESTING_ORDER_PAYMENT_NOT_EXISTED(31001, "Error_Pay_Order_Payment_Not_existed", "订单支付信息不存在"),

    GENETIC_TESTING_ORDER_PAYMENT_PAID(31002, "Error_Pay_Order_Payment_Paid", "订单已支付"),

    PAYMENT_AMOUNT_EXCEPTION(31003, "Error_Pay_Payment_Amount_Exception", "支付金额异常"),

    PAYMENT_FAILED(31004, "Error_Pay_Payment_Failed", "获取支付信息失败"),

    GENETIC_TESTING_ORDER_PAYMENT_BUSINESS_TYPE(31005, "Error_Pay_Business_Type", "非法的业务类型"),

    ORDER_PAY_IS_ERROR(31006, "ORDER_PAY_IS_ERROR", "订单支付失败"),

    QUERY_PAY_ORDER_IS_ERROR(31007, "ORDER_PAY_QUERY_IS_ERROR", "查询支付订单失败"),

    QUERY_PAY_METHOD_IS_ERROR(31008, "QUERY_PAY_METHOD_IS_ERROR", "查询支付方式失败"),
    ORDER_PAY_AMOUNT_ERROR(31009, "ORDER_PAY_AMOUNT_ERROR", "订单支付金额不一致"),
    PAY_TYPE_IS_NOT_NULL(31010, "PAY_TYPE_IS_NOT_NULL", "支付类型不能空"),
    QUERY_ORDER_PAY_INFO_IS_ERROR(31011, "QUERY_ORDER_PAY_INFO_IS_ERROR", "支付信息获取失败"),
    PAY_CODE_IS_NOT_EXISTS(31012, "PAY_CODE_IS_NOT_EXISTS", "支付二维码地址信息不存在"),
    PAY_CODE_GENERATE_ERROR(31013, "PAY_CODE_GENERATE_ERROR", "支付二维码创建失败"),
    PAY_METHOD_IS_NULL(31014, "QUERY_PAY_METHOD_IS_NULL", "支付方式为空");

    private final int code;

    private final String message;

    private final String description;

    PayErrorCode(int code, String message, String description) {
        this.code = code;
        this.message = message;
        this.description = description;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public String getDescription() {
        return description;
    }
}
